<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Position_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-position_id" data-rule="required" data-source="ad/position/index" data-primary-key="position_id" data-field="position_name" class="form-control selectpage" name="row[position_id]" type="text" value="{$row.position_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ad_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ad_name" data-rule="required" class="form-control" name="row[ad_name]" type="text" value="{$row.ad_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time?datetime($row.start_time):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:$row.end_time?datetime($row.end_time):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mode')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-mode" data-rule="required" class="form-control selectpicker" name="row[mode]">
                {foreach name="modeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.mode"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group arealist-class" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Arealist')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-arealist" class="form-control selectpicker" multiple="" name="row[arealist][]" title="选择（支持多选）">
                {foreach name="arealistList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.arealist"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group newhouse-class" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Newhouse_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-newhouse_ids" data-rule="" data-source="newhouse/newhouse/index" data-field="title" data-params='{"custom[partner]":"0"}' data-multiple="true" class="form-control selectpage" name="row[newhouse_ids]" type="text" value="{$row.newhouse_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ad_file')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group" style="display: flex;">
                <input id="c-ad_file" class="form-control" size="50" name="row[ad_file]" data-rule="" type="hidden" value="{$row.ad_file|htmlentities}">
                <div class="input-group no-border no-padding">
                    <span><button type="button" id="plupload-ad_file" class="btn btn-danger plupload" data-multipart={"module":"h/newspic"} data-maxcount="1" data-input-id="c-ad_file" data-mimetype="image/jpeg,image/png,image/jpg" data-multiple="false" data-preview-id="p-ad_file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-ad_file"></span>
                <span style="margin: 7px 10px;display: block;">需上传1张图。1：1格式</span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-ad_file"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('slogan')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-slogan" data-rule="required" class="form-control" name="row[slogan]" type="text" value="{$row.slogan|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ad_link')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ad_link" data-rule="required" class="form-control" name="row[ad_link]" type="text" value="{$row.ad_link|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Clientname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-clientname" class="form-control" name="row[clientname]" type="text" value="{$row.clientname|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Link_man')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-link_man" class="form-control" name="row[link_man]" type="text" value="{$row.link_man|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remarks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remarks" class="form-control " rows="5" name="row[remarks]" cols="50">{$row.remarks|htmlentities}</textarea>
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div> -->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-admin_id" class="form-control" name="row[admin_id]" type="hidden" value="{:$auth->id}">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
